#ifndef LIB_AX_SOLVER_BASE_H
#define LIB_AX_SOLVER_BASE_H

#include "libAcoustX/ocean/OceanDataset.h"
#include "libAcoustX/ocean/OceanSedimentDef.h"
#include "libAcoustX/core/param/SolveParam_Area.h"
#include "libAcoustX/core/param/SolveParam_Line.h"
#include "libAcoustX/core/param/SolveParam_Point.h"
#include "libAcoustX/core/result/SolveResult_Area.h"
#include "libAcoustX/core/result/SolveResult_Line.h"
#include "libAcoustX/core/result/SolveResult_Point.h"
#include "libAcoustX/core/Source.h"

namespace ax {
namespace solve {
class AX_EXPORT Base
{
public:
	using sptr = std::shared_ptr<Base>;
	using csptr = std::shared_ptr<const Base>;

	Base();
	virtual ~Base();

	void setSource(const ax::core::Source::sptr& source);
	core::Source::sptr getSource() const;

	void setOceanDataset(const ax::ocean::Dataset::sptr& dataset);
	ax::ocean::Dataset::sptr getOceanDataset() const;

	virtual res::Line::sptr solveLine(param::Line::sptr solve_param) = 0;
	virtual res::Point::sptr solvePoint(param::Point::sptr solve_param) = 0;
	virtual res::Area::sptr solveArea(param::Area::sptr solve_param) = 0;
	std::string getLastErrorMessage() const;

protected:
	ax::core::Source::sptr mSource;
	ax::ocean::Dataset::sptr mOceanData;
	mutable std::string mLastErrorMessage;

private:

};

} // namespace solve
} // namespace ax

#endif // !LIB_AX_SOLVER_BASE_H
